﻿//vs
//#version 150

in vec3 inPosition;

uniform mat4 mvpMat;

void main() {
    gl_Position = mvpMat * vec4(inPosition, 1.0);
}

//fs
//#version 150

uniform vec4 color = vec4(0.5); // default: red color.

uniform bool halfTransparent = false;

out vec4 outColor;

void main() {
    if (halfTransparent) {
        if (int(gl_FragCoord.x + gl_FragCoord.y) % 2 == 1) discard;
    }

    outColor = color;
}
